package com.dst.service.impl;

import com.dst.dao.BrandMapper;
import com.dst.entity.Brand;
import com.dst.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("brandService")
public class BrandServcieImpl implements BrandService {
    @Autowired
    @Qualifier("brandMapper")
    private BrandMapper brandMapper;
    @Override
    public List<Brand> selectAll() {
        List<Brand> brands = brandMapper.selectAll();
        return brands;
    }

    @Override
    public List<Brand> selectAll0001() {
        List<Brand> brands = brandMapper.selectAll001();
        return brands;
    }

    @Override
    public void delete(int id) {
        brandMapper.deleteBrand(id);
    }

    @Override
    public void add(Brand brand) {
        brandMapper.add(brand);
    }
}
